/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package beans;

import dao.SoftwareFacade;
import entity.Software;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.SessionScoped;

/**
 *
 * @author HumanBooster
 */
@ManagedBean(eager=true)
@ApplicationScoped
public class SoftwareControllerFront {
    @EJB
    private SoftwareFacade softwareFacade;

    private List<Software> softwares = new ArrayList<Software>();

    @PostConstruct
    public List<Software> getSoftwares() {
        
        softwares = softwareFacade.findAll();
        System.out.println("this = " + softwares.size());
        return softwares;
    }

    public void setSoftwares(List<Software> softwares) {
        this.softwares = softwares;
    }
    

    
    
    
    /**
     * Creates a new instance of ProductsController
     */
    public SoftwareControllerFront() {
    }
    
    
    
    public String doStuff(){
        return "stuff";
    }
}
